export interface FileReader {
  read(filePath: string): string;
}

export class ReadAndProcessFile {
  private _fileReader: FileReader | undefined;

  constructor(fileReader?: FileReader) {
    this._fileReader = fileReader;
  }

  run(filePath: string) {
    const content = this._fileReader?.read(filePath);

    return content + " unit test";
  }

  get fileReader(): FileReader | undefined {
    return this._fileReader;
  }

  set fileReader(fileReader: FileReader) {
    this._fileReader = fileReader;
  }

  setFileReader(fileReader: FileReader) {
    this._fileReader = fileReader;
  }
}
